import com.crr.dao.IceBox;
import com.crr.log.OutOfNumberException;
import org.junit.Before;
import org.junit.Test;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class test1 {
    BeanFactory bf=null;
    @Before
    public void init(){
        bf=new ClassPathXmlApplicationContext("spring.xml");
    }
    @Test
    public void iceBoxTest() throws OutOfNumberException {
       IceBox iceBox= bf.getBean("iceBox", IceBox.class);
       iceBox.storeIceBox(100);
       iceBox.buyIceBox(1);
    }
}
